<template>
  <div>
    <a-table
    :columns="columns"
    :data-source="dataSource"
  >
    <template #name="{ text }">{{ text.first }} {{ text.last }}</template>
  </a-table>
  </div>
</template>

<script>
import { reactive, toRefs } from '@vue/reactivity';
import {$Http} from "@utils/request.js"
import {list} from "@apis/exam.js"
import { onMounted } from '@vue/runtime-core';

export default {
  setup() {
    const state = reactive({
      // dataSource,
      // columns
    })

    const API_list = (current,size)=>{
      return $Http.request({
        url:list,
        method:"POST",
        data:{
          page:{
            size,
            current
          }
        }
      })
    }

    onMounted(async ()=>{
      let res = await API_list(1,10)
      console.log(res)
    })

    return {
      ...toRefs(state)
    }
  },
};
</script>

<style>
</style>